package no1;

import java.io.*;

public class SecondIO {
	public static void main(String args[]) throws IOException {
		File f = new File("D:\\KY5_1.HTML\\1.txt");
		FileReader fr = null;
		BufferedReader br = null;
		FileWriter fw = null;
		try {
			fr = new FileReader(f);
			br = new BufferedReader(fr);
			fw = new FileWriter("D:\\KY5_1.HTML\\KY5_1.txt", true);
			String str;
			while((str = br.readLine()) != null) {
				System.out.println(str);
				fw.write(str + "\r\n");
			}
		}catch(Exception e) {
			System.out.println(e.getMessage());
		} finally {
			try {
				fr.close();
				fw.close();
				br.close();
			} catch(IOException e) {
				e.printStackTrace();
			}
		}
	}
}
